package com.qiuling.iot.rabbit;

import lombok.extern.slf4j.Slf4j;
import org.springframework.amqp.core.Message;
import org.springframework.amqp.rabbit.core.RabbitTemplate;

/**
 * @Author：zhangqiang
 * @Description：
 * @Date：Created in 0:57 2020/3/6
 * @Modified By：
 */
@Slf4j
public class RabbitReturnCallback implements RabbitTemplate.ReturnCallback{

    @Override
    public void returnedMessage(Message message, int replyCode, String replyText, String exchange, String routingKey) {
        log.info("消息主体:({}), 回复编码:({}), 回复内容:({}), 交换机:({}), 路由键:({})", message, replyCode, replyText, exchange, routingKey);
    }
}
